#include"protocol.hpp"
#include<iostream>
#include"tcpserver.hpp"
#include"servercal.hpp"
using namespace std;
void usage(const string&proc)
{
cout<<"\nusage: "<<proc<<" port\n"<<endl;
}
int main(int argc,char*argv[])
{
if(argc!=2)
{
  usage(argv[0]);
  exit(0);
}
uint16_t port=stoi(argv[1]);
serveror cal;
tcpserver* st=new tcpserver(port,bind(&serveror::calculator,&cal,placeholders::_1));
st->initserver();
st->run();
return 0;

}